package com.example.zhugenew.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.example.mymvplibrary.adapter.BaseAdapter;
import com.example.mymvplibrary.adapter.BaseViewHolder;
import com.example.zhugenew.R;
import com.example.zhugenew.bean.TimeInfo;

import java.util.List;

public class TimeInfoAdapter extends BaseAdapter<TimeInfo.ListBean> {

    public TimeInfoAdapter(List<TimeInfo.ListBean> datas, Context context, int layoutId) {
        super(datas, context, layoutId);
    }

    @Override
    public void bindData(BaseViewHolder holder, TimeInfo.ListBean listBean, int pos) {
        TextView tv_maifang = holder.getView(R.id.tv_maifang);
        TextView tv_xinwen = holder.getView(R.id.tv_xinwen);
        ImageView iv_infoimage = holder.getView(R.id.iv_infoimage);

        tv_maifang.setText(listBean.getTitle());
        tv_xinwen.setText(listBean.getC_name());
        Glide.with(context).load(listBean.getThumb()).into(iv_infoimage);
    }



}
